The process of ‘localizing’ a software application (i.e., changing it to display its user interface in another language other than English) has historically been a very expensive and time-consuming business. So much so that the majority of software programs are never localized to any other language. An industry has sprung up to try to help companies localize their software by providing localization experts and target language speakers. These services are expensive and require the disclosure of sensitive trade secrets, such as source code, to third parties. In the last five years or so, the operating system manufacturers and programming language designers have made some steps towards trying to alleviate these problems. In all such cases, however, the basic approach is to have all user interface strings come from a ‘resource’ that is loaded from a different location depending on the language that is being used by the program. In this way, as long as the programmer always obtains text from this source through the mechanism provided, the code written should operate equally well in another language provided that all of the corresponding resources are available in that language. This approach, while an improvement over the previous situation, still has many shortcomings.
One problem with this approach is that it forces all code to be written from the outset with localization in mind. The programmer is no longer free to simply add or alter the text content of the user interface and certainly cannot use a string constant in the program source code. Because there is a natural tendency for programmers to use such content, however, it will often happen regardless of localization policies. The result of this approach to localization is that the program becomes unreadable, since it is very difficult to see by examining the code what is being ‘said’. Another problem with this approach is its limited ability to handle variable strings (i.e., those strings in which a portion of the string, such as the time, varies while the rest is constant). Yet another negative in this approach, regardless of the particular flavor (since all are basically similar), is that when strings are read back from the user interface elements (e.g., the name of a button), the strings can no longer be assumed to be in English and thus code that manipulates the UI cannot perform simple operations like checking if the button name is “OK” but must instead find a localization agnostic way to achieve this simple operation.
The end result of all these shortcomings is that designing a program for localization takes a lot of work and discipline, makes the code base obscure and highly dependant on the localization metaphor, and denies to programmers the simplifying model that their application is running only in English. What is needed then is another approach to localization that does not require any special calls from the programmer, does not deny the use of simple English string constants, is platform and language independent, and maintains the ability to read back English from the elements of the UI.